require 'dbi'
require 'mysql'

class TempController < ApplicationController
  
  def index
  end
  
  def exe
    @temp=params[:SQL][:Query].to_s
    @query=@temp.split(";")
    @db=Mysql.new('127.0.0.1','root','msgp02','sbonline_development')
    @query.each do |q|
      @db.query(q<<";")
    end
    @db.close
    render :template=>"success"
  end
  
  def sp
    @show=Keyword.spliter(params[:sp][:test])
    render :template=>"temp/show"
  end
    
end
